﻿using CommonDevelop;
using CommonDevelop.DB;
using ManageDB;
using System;
using System.Linq.Expressions;

namespace ManageRepository
{
    /// <summary>
    /// 角色数据层接口
    /// </summary>
    public interface IRoleRepository : IBase<Base_Role>
    {

    }

    /// <summary>
    /// 角色数据层
    /// </summary>
    public class RoleRepository : DBBase<Base_Role>, IRoleRepository
    {
        public override Expression<Func<Base_Role, bool>> WhereKeyWord(string keyword)
            => t => t.RoleCode.Contains(keyword)
            || t.PositionName.Contains(keyword)
            || t.FullName.Contains(keyword);
    }
}
